﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


using HA.ModFlow.Domain.DomainLayer;

using HA.MT3DMS.DomainLayer;

namespace HA.Data
{
    [Serializable]
  public  class GWModflow:GWModel,ICloneable
    {
        public GWModflow()
        {
            this._modelName = "ModFlow";



            //初始化图层类型

            this._coverageSetup.ScTypes.Add(MAPSCType.LAYERRANGE,false);


            this._coverageSetup.ScTypes.Add(MAPSCType.WELL, false);

            this._coverageSetup.ScTypes.Add(MAPSCType.REFINEPOINTS, false);

            this._coverageSetup.ScTypes.Add(MAPSCType.SPECIFIEDHEAD, false);
            this._coverageSetup.ScTypes.Add(MAPSCType.SPECIFIEDFLOW, false);

         

            this._coverageSetup.ScTypes.Add(MAPSCType.GENERALHEAD, false);





            this._coverageSetup.ScTypes.Add(MAPSCType.DRAIN,false);
            this._coverageSetup.ScTypes.Add(MAPSCType.RIVER,false);

            this._coverageSetup.ScTypes.Add(MAPSCType.BARRIER, false);


            this._coverageSetup.ScTypes.Add(MAPSCType.OBSERVEDFLOW, false);
            this._coverageSetup.ScTypes.Add(MAPSCType.TANSOBSERVEDFLOW, false);

            this._coverageSetup.ScTypes.Add(MAPSCType.SEEPAGEFACE, false);



            //加入mt3dms所包含的两项


            this._coverageSetup.ScTypes.Add(MAPSCType.SPECIFIEDCONC, false);

            this._coverageSetup.ScTypes.Add(MAPSCType.MASSLOADING, false);








            //面妆源汇

            //this._coverageSetup.ArealTypes.Add(MAPArealType.LAYERANGE,false);  //暂时只保留一个layerrange
            this._coverageSetup.ArealTypes.Add(MAPArealType.RECHARGERATE,false);
            this._coverageSetup.ArealTypes.Add(MAPArealType.RECHARGECONC, false);
            this._coverageSetup.ArealTypes.Add(MAPArealType.HORIZONTALK, false);
            this._coverageSetup.ArealTypes.Add(MAPArealType.VERTICLEK, false);
            this._coverageSetup.ArealTypes.Add(MAPArealType.HORIZONTALANIS, false);
            this._coverageSetup.ArealTypes.Add(MAPArealType.VERTICLEANIS, false);
            this._coverageSetup.ArealTypes.Add(MAPArealType.SPECIFICSTORAGE, false);
            this._coverageSetup.ArealTypes.Add(MAPArealType.SPECIFICYIELD, false);
            this._coverageSetup.ArealTypes.Add(MAPArealType.TOPELVE, false);
            this._coverageSetup.ArealTypes.Add(MAPArealType.BOTELVE, false);
            this._coverageSetup.ArealTypes.Add(MAPArealType.WETDRYFALG, false);

            this._coverageSetup.ArealTypes.Add(MAPArealType.MAXETRATE, false);
            this._coverageSetup.ArealTypes.Add(MAPArealType.ETELEV, false);
            this._coverageSetup.ArealTypes.Add(MAPArealType.ETEXTINCTIONDEPTH, false);










            //面源BCF


            this._coverageSetup.ArealTypes.Add(MAPArealType.TRANSMISSITY, false);
            this._coverageSetup.ArealTypes.Add(MAPArealType.LEAKANCE, false);
            this._coverageSetup.ArealTypes.Add(MAPArealType.PrimaryStorage, false);
            this._coverageSetup.ArealTypes.Add(MAPArealType.SecondaryStorage, false);



            //mt3d部分的属性


            this._coverageSetup.ArealTypes.Add(MAPArealType.POROSITY, false);
            this._coverageSetup.ArealTypes.Add(MAPArealType.STARTINGCONCENTRATION, false);

            this._coverageSetup.ArealTypes.Add(MAPArealType.LONGDISPERSITY, false);

            this._coverageSetup.ArealTypes.Add(MAPArealType.BULKDENSITY, false);

            this._coverageSetup.ArealTypes.Add(MAPArealType.IMMOBILEPOROSITY, false);







            //观察点

            this._coverageSetup.ObservationTypes.Add(MAPObservationType.HEAD,false);







        }



        //应力期的个数

        int _nPeriods=1;

        public int NPeriods
        {
            get { return _nPeriods; }
            set {

                if (value<1)
                {
                    value = 1;
                    
                }
                _nPeriods = value; 
            
            }
        }



        INNERPACK _innerPack = INNERPACK.LPF;

        public INNERPACK InnerPack
        {
            get { return _innerPack; }
            set { _innerPack = value; }
        }


        bool _isTransPort=false;

        public bool IsTransPort
        {
            get { return _isTransPort; }
            set { _isTransPort = value; }
        }


        ModelType _transportModel = ModelType.MT3DMS;

        public ModelType TransportModel
        {
            get { return _transportModel; }
            set { _transportModel = value; }
        }


        List<MTSpecies> _speList=new List<MTSpecies> ();

        public List<MTSpecies> SpeList
        {
            get { return _speList; }
           
        }

        public object Clone()
        {
            GWModflow gw = new GWModflow();
            gw = (GWModflow) this.MemberwiseClone();
            List<MTSpecies> arry = new List<MTSpecies>();
            foreach (MTSpecies sp in this.SpeList)
            {
                arry.Add((MTSpecies)sp.Clone());
            }
            gw._speList = arry;
            return gw;
        }

    }
}
